package com.grapes.widget;

import com.grapes.R;
import android.content.Context;
import android.os.AsyncTask;
import android.util.AttributeSet;
import android.widget.ImageView;

public class GrapesHeadIconImgView extends ImageView{

	public GrapesHeadIconImgView(Context context) {
		super(context);
	}

	public GrapesHeadIconImgView(Context context, AttributeSet attrs,
			int defStyle) {
		super(context, attrs, defStyle);
	}

	public GrapesHeadIconImgView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setResourceUrl(String url)
	{
		setBackgroundResource(R.drawable.search);
		setScaleType(ScaleType.CENTER_CROP);
		new DownloadImgAsyncTask().execute(url);
	}
	
	//TODO
	class DownloadImgAsyncTask extends AsyncTask<String,Void,Void>{
		@Override
		protected Void doInBackground(String... params) {
			return null;
		}		
	}
}
